<script type="text/javascript">
function savetable(){
	$.CurrentNavtab.find('#userform').submit();
}
</script>
<div class="bjui-pageHeader">
	<form id="pagerForm" data-toggle="ajaxsearch" action="${ctx}/user/leader" method="post">
        <input type="hidden" name="pageSize" value="${page.pageSize!15}">
        <input type="hidden" name="pageCurrent" value="${page.pageCurrent!1}">
        <input type="hidden" name="orderField" value="${page.orderField!"id"}">
        <input type="hidden" name="orderDirection" value="${page.orderDirection!"asc"}">
        
        <div class="bjui-searchBar">
            <label>工号：</label><input type="text" value="${code!}" name="code" size="10" />&nbsp;
            <label>姓名：</label><input type="text" value="${realname!}" name="realname" size="8" />&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <a class="btn btn-orange" href="javascript:;" onclick="$(this).navtab('reloadForm', true)" data-icon="undo">清空查询</a>&nbsp;  
            <div class="pull-right">
                <button type="button" class="btn-blue" data-toggle="lookupback" data-lookupid="ids" data-warn="请至少选择一人" data-icon="check-square-o">选择选中</button>
            </div>                     
        </div>
        
    </form>
</div>
<div class="bjui-pageContent tableContent">
        <table id="tableuser" class="table table-bordered table-hover table-striped table-top">
            <thead>
                <tr>
                    <th data-order-field="code" title="工号">工号</th>
                    <th data-order-field="realname" title="姓名">姓名</th>
                    <th data-order-field="username" title="账号">账号</th>
                	<th data-order-field="isactive" title="状态">状态</th>
                	<th data-order-field="entrytime" title="入职日期">入职日期</th>
                	<th width="28"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
            <%
               if (page.pageData != null){
                  for (user in page.pageData){
            %>
	                		<tr data-id="${user.id!}">
				                <td>${user.code!}</td>
				                <td>${user.realname!}</td>
				                <td>${user.username!}</td>
				                <td data-val="${user.isactive!}">${user.isactive==1?"启用":"禁用"}</td>
				                <td>${user.entrytime,dateFormat="yyyy-MM-dd"}</td>
				                <td><input type="checkbox" name="ids" data-toggle="icheck" value="{${ids}:'${user.id}', ${names}:'${user.realname}'}"></td>
				                <td>
				                    <a href="javascript:;" data-toggle="lookupback" data-args="{${ids}:'${user.id}', ${names}:'${user.realname}'}" class="btn btn-blue" title="选择本项" data-icon="check">选择</a>
				                </td>				                
				            </tr>
		    <%
		          }
		       }
		    %>
            </tbody>
        </table>
     </div>
    <div class="bjui-pageFooter">
		<div class="pages">
			<span>每页&nbsp;</span>
			<div class="selectPagesize">
				<select data-toggle="selectpicker" data-defval="${page.pageSize!}" data-toggle-change="changepagesize" >
		    		<option value="15">15</option>
		        	<option value="30">30</option>
		        	<option value="50">50</option>
		        	<option value="100">100</option>
		    	</select>
			</div>
			<span>&nbsp;条，共  ${page.totalRow!0} 条</span>
		</div>
		<div class="pagination-box" data-toggle="pagination" data-total="${page.totalRow!}" data-page-size="${page.pageSize!15}" data-page-current="${page.pageCurrent!1}">
		</div>
	</div>